{extend name="public/base" /}

{block name="title"}<title>见证信息</title>{/block}

{block name="pjax_container"}
<section class="content-header">
    <h1>见证信息</h1>
    <ol class="breadcrumb">
        <li class="active"><i class="fa fa-dashboard"></i> 见证信息</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" method="POST" action="{:url('witness_edit_save')}" onsubmit="return false">
                <input type="hidden" name="id" value="{$info.id|default=0}" />
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="pull-right"><a href="javascript:history.back(-1)" class="btn btn-sm" style="padding:10px 2px;"><i class="fa fa-list"></i> 返回</a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab1">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">用户昵称</label>
                                <div class="col-sm-7" style="padding-top:7px;">
                                    <a href="{:url('client_user/edit', ['id'=>$info.user_id])}">{$info.nickname}</a>
                                    <!--<input class="form-control" disabled="disabled" value="">-->
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">健身照片</label>
                                <div class="col-sm-7">
                                    {foreach name="$info.imgs" item="vo"}
                                        <a href="{$vo}" target="_blank"><img src="{$vo}" style="width:200px;height:200px;"/></a>
                                    {/foreach}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">见证说明</label>
                                <div class="col-sm-7">
                                    {$info.desc}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">接受邀请见证用户</label>
                                <div class="col-sm-7" style="padding-top:7px;">
                                    {foreach name="user_witness" item="vo"}
                                        <a href="{:url('client_user/edit', ['id'=>$vo.id])}" target="_blank">{$vo.nick}</a> &nbsp;&nbsp;&nbsp;
                                    {/foreach}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">完成见证</label>
                                <div class="col-sm-7">
                                    <input class="form-control" disabled="disabled" value="{$info.StatusStr}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">发布时间</label>
                                <div class="col-sm-7">
                                    <input class="form-control" disabled="disabled" value="{$info.create_time}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">状态</label>
                                <div class="col-sm-7">
                                    <select class="form-control select2" name="examine" style="width:100%;">
                                        <option value="0"{if condition="0 == $info['examine']"}selected="selected"{/if}>待审核</option>
                                        <option value="1"{if condition="1 == $info['examine']"}selected="selected"{/if}>审核通过</option>
                                        <option value="2"{if condition="2 == $info['examine']"}selected="selected"{/if}>审核失败</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">审核失败原因</label>
                                <div class="col-sm-7">
                                    <textarea name="audit_desc" cols="120" rows="7" style="padding:8px;">{$info.audit_desc}</textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="box-footer">
                        <div class="col-sm-2"></div>
                        <div class="col-sm-7">
                            <div class="btn-group pull-right">
                                <button type="submit" class="btn btn-info pull-right submits" data-loading-text="&lt;i class='fa fa-spinner fa-spin '&gt;&lt;/i&gt; 提交">提交</button>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</section>
<div id="modal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
    <div class="modal-dialog modal-lg" role="document" style="height:60%;">
        <div class="modal-content" style="height:100%;"></div>
    </div>
</div>
<script type="text/javascript">
    $("#modal").on("hidden.bs.modal", function() {
        $(this).removeData("bs.modal");
    });
    $(function(){
        /*ajax页面加载icheck，有该控件的页面才需要*/
        $(".select2").select2({language:"zh-CN"});
    });
</script>
{/block}
